package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qijian.maindata.domain.CustomerComplaintsDuty;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * 客户投诉责任人Mapper接口
 *
 * @author qijian
 * @date 2024-09-06
 */
public interface CustomerComplaintsDutyMapper extends BaseMapper<CustomerComplaintsDuty> {

    @Select("select count(0) from main_customer_complaints_duty WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    @Delete("delete from main_customer_complaints_duty  where main_id = #{mainId}")
    void removeByMainId(@Param("mainId") Long mainId);

}
